Overview | Package | Class | Tree | Deprecated | Index | Help | |||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Canvas | +--com.pacist.diamonds.DiamondCanvas | +--com.pacist.diamonds.Controller | +--com.pacist.diamonds.AngularController | +--com.pacist.diamonds.Knob
Fields inherited from class com.pacist.diamonds.Controller | |
canMeasure, listeners, maxValue, minValue, postOnMouseDown, postWhileDragging, showValue, value |
Fields inherited from class com.pacist.diamonds.DiamondCanvas | |
tipText |
Fields inherited from class java.awt.Component | |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Constructor Summary | |
Knob()
Creates and initializes a Knob object. |
Method Summary | |
void | drawBGRect(java.awt.Graphics g,
java.awt.Dimension size)
Draws the background rectangle of the Knob. |
void | drawKnob(java.awt.Graphics g,
java.awt.Rectangle displayRect)
This method is called to draw the Knob on the screen. |
void | drawSpot(java.awt.Graphics g,
java.awt.Rectangle displayRect,
java.awt.Point p)
Draws the spot indicating the current value of the Knob. |
void | drawTicks(java.awt.Graphics g,
java.awt.Rectangle displayRect,
java.awt.Point p)
Draws the ticks around the edge of the Knob. |
java.awt.Rectangle | getDisplayRect(java.awt.Dimension size)
|
java.awt.Dimension | minimumSize()
Gets the mininimum size of the Knob. |
void | paint(java.awt.Graphics g)
This method is called to repaint the Knob. |
java.awt.Dimension | preferredSize()
Gets the preferred size of the Knob. |
Methods inherited from class com.pacist.diamonds.AngularController | |
angleToValue, getCentre, getDisplayRect, getDisplayRect, paint, paintTick, pointToValue, scaleForY, scaleForY, valueToAngle |
Methods inherited from class com.pacist.diamonds.Controller | |
addControllerListener, getMaxValue, getMinValue, getPostOnMouseDown, getShowValue, getValue, getValueString, isMaxAtBottom, mouseDragged, mousePressed, mouseReleased, notifyValueChange, pinValue, pointToValue, processMouseEvent, processMouseMotionEvent, removeControllerListener, setMaxAtBottom, setMaxValue, setMinValue, setPostOnMouseDown, setShowValue, setValue |
Methods inherited from class com.pacist.diamonds.DiamondCanvas | |
getTipText, mouseEnter, mouseExit, processMouseEvent, setTipText |
Methods inherited from class java.awt.Canvas | |
addNotify, paint |
Methods inherited from class java.awt.Component | |
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paint, paramString, postEvent, preferredSize, prepareImage, prepareImage, printAll, print, processComponentEvent, processEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate |
Methods inherited from class java.lang.Object | |
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait |
Constructor Detail |
public Knob()
Method Detail |
public java.awt.Dimension preferredSize()
Dimension
- a dimension object indicating the knob's preferred size.public java.awt.Dimension minimumSize()
Dimension
- a dimension object indicating the knob's minimum size.protected java.awt.Rectangle getDisplayRect(java.awt.Dimension size)
public void paint(java.awt.Graphics g)
g
- The graphics context to use for painting.protected void drawKnob(java.awt.Graphics g, java.awt.Rectangle displayRect)
g
- the graphics context.
displayRect
- the display rectangle.protected void drawBGRect(java.awt.Graphics g, java.awt.Dimension size)
g
- the graphics context.
size
- the size of the rectangle to draw.protected void drawSpot(java.awt.Graphics g, java.awt.Rectangle displayRect, java.awt.Point p)
g
- the graphics context.
displayRect
- the display rectangle.
p
- the offset for the position of the spot.protected void drawTicks(java.awt.Graphics g, java.awt.Rectangle displayRect, java.awt.Point p)
g
- the graphics context.
displayRect
- the display rectangle.
p
- the offset for the position of the ticks.Overview | Package | Class | Tree | Deprecated | Index | Help | |||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |